|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.ChargingPlanDictionaryModel
public class ChargingPlanDictionaryModel
This class represents the dictionary for all the charging plans of the charge component.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargingPlanDictionary">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="dictionaryComponent" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="typedDictionaryComponent" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element><xs:element name="dictionaryComponent">
<xs:complexType>
<xs:attribute name="internalChargingReference" type="xs:string" use="required"/>
<xs:attribute name="backupChargingReference" type="xs:string" default="_default_charging_reference_"/>
</xs:complexType>
</xs:element><xs:element name="typedDictionaryComponent">
<xs:complexType>
<xs:attribute name="internalChargingReference" type="xs:string" use="required"/>
<xs:attribute name="chargingReferenceType" type="AccountType" use="required"/>
</xs:complexType>
</xs:element>
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHARGING_REFERENCE
This string represents the default charging reference in the dictionary. |
| Constructor Summary | |
|---|---|
ChargingPlanDictionaryModel()
Create an empty dictionary. |
|
ChargingPlanDictionaryModel(java.util.LinkedHashMap<java.lang.String,java.lang.Object> dictionary,
boolean dictionaryTyped)
|
|
| Method Summary | |
|---|---|
void |
addAllReferencesFrom(ChargingPlanDictionaryModel other)
Adds all charging references of the given dictionary in the current dictionary. |
void |
addBackupChargingReference(java.lang.String internal,
java.lang.String backup)
Adds a backup charging reference to the internal charging reference. |
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChargingReferenceType(java.lang.String internal,
ChargingPlanAccountType type)
Adds a charging reference type to the internal charging reference. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
java.lang.Object |
clone()
|
java.lang.String |
getBackupChargingReference(java.lang.String internal)
Return the backup charging reference corresponding to the internal charging reference. |
ChargingPlanAccountType |
getChargingReferenceType(java.lang.String internal)
Return the account type of the charging reference corresponding to the internal charging reference. |
java.util.HashMap<java.lang.String,java.lang.Object> |
getDictionary()
Returns the HashMap representing the dictionary |
java.util.Iterator<java.lang.String> |
getInternalChargingReferences()
Gets a iteration of all internal charging references of the dictionary. |
java.lang.String |
hasCycle()
Cycle detection in the dictionary. |
java.lang.String |
hasCycleFrom(java.lang.String internal)
Cycle detection in the dictionary starting from a internal charging reference. |
boolean |
isDictionaryTyped()
Returns true if the charging references in the dictionary are typed. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
removeInternalChargingReference(java.lang.String internal)
Removes the internal charging reference and shifts all the corresponding backup references to default charging reference. |
void |
replaceChargingReferenceType(java.lang.String internal,
ChargingPlanAccountType oldType,
ChargingPlanAccountType newType)
Replace a account type of the charging reference by another one. |
void |
replaceInternalChargingReference(java.lang.String oldInternal,
java.lang.String newInternal)
Replace an internal charging reference by another one. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setDictionaryTyped(boolean dictionaryTyped)
|
int |
size()
Returns the number charging references in the dictionary. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_CHARGING_REFERENCE
| Constructor Detail |
|---|
public ChargingPlanDictionaryModel()
public ChargingPlanDictionaryModel(java.util.LinkedHashMap<java.lang.String,java.lang.Object> dictionary,
boolean dictionaryTyped)
| Method Detail |
|---|
public java.util.Iterator<java.lang.String> getInternalChargingReferences()
public void replaceInternalChargingReference(java.lang.String oldInternal,
java.lang.String newInternal)
oldInternal - the reference to replace.newInternal - the new reference.
java.lang.NullPointerException - is thrown in the twice following cases:
public void removeInternalChargingReference(java.lang.String internal)
internal - the internal charging reference.
java.lang.NullPointerException - is thrown when the parameter "internal" is null.public ChargingPlanAccountType getChargingReferenceType(java.lang.String internal)
internal - the internal charging reference for which, we want the corresponding account type.
public void addChargingReferenceType(java.lang.String internal,
ChargingPlanAccountType type)
internal - the internal charging reference.type - the internal charging reference type.
java.lang.NullPointerException - is thrown in the twice following cases:
public void replaceChargingReferenceType(java.lang.String internal,
ChargingPlanAccountType oldType,
ChargingPlanAccountType newType)
oldType - the reference type to replace.newType - the new reference type.
java.lang.NullPointerException - is thrown in the twice following cases:
public java.lang.String getBackupChargingReference(java.lang.String internal)
internal - the internal charging reference for which, we want the corresponding backup.
public void addBackupChargingReference(java.lang.String internal,
java.lang.String backup)
The backup charging reference has to be already present in the dictionary and the internal charging reference has to be a new one in the dictionary.
internal - the internal charging reference.backup - the backup charging reference corresponding to the internal charging reference.
java.lang.NullPointerException - is thrown in the twice following cases:
java.lang.IllegalArgumentException - is thrown in the twice following cases:
public void addAllReferencesFrom(ChargingPlanDictionaryModel other)
other - The dictionary from which we get the charging references.public int size()
public java.util.HashMap<java.lang.String,java.lang.Object> getDictionary()
public void setDictionaryTyped(boolean dictionaryTyped)
public boolean isDictionaryTyped()
public java.lang.String hasCycleFrom(java.lang.String internal)
internal - the internal charging reference of the start.
public java.lang.String hasCycle()
public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||